<html xmlns="http://www.w3.org/1999/xhtml"><head>


<%@page import="java.util.*"%>
 <%@page import="java.text.ParseException"%>
 <%@page import="java.text.SimpleDateFormat"%>
<%@page  import="java.util.Calendar"%>
<%@page  import=" java.util.Date"%>
<%@page  import="java.util.TimeZone"%>




<script src="http://threedubmedia.com/inc/js/jquery-1.7.2.js"></script>
<script src="http://threedubmedia.com/inc/js/jquery.event.drag-2.2.js"></script>
<script src="http://threedubmedia.com/inc/js/jquery.event.drag.live-2.2.js"></script>
<script src="http://threedubmedia.com/inc/js/jquery.event.drop-2.2.js"></script>
<script src="http://threedubmedia.com/inc/js/jquery.event.drop.live-2.2.js"></script>



</head>
<body>
<script type="text/javascript">
jQuery(function($){
	$('.drag')
		.drag("start",function( ev, dd ){
			document.title = $(ev.target).attr("class");
		})
		.drag(function( ev, dd ){
			document.title = "S - " + $(ev.target).attr("class");
		
		});
	$('.drop')
		.drop("start",function(){
			$( this ).addClass("active");
		})
		.drop("end",function(){
			$( this ).removeClass("active");
		});
});
</script>



<div class="drop">C</div>
<div class="drop">B</div>
<div class="drop">A</div>
<div class="drag" style="left:20px;">jjjjj</div>
<div class="drag" style="left:100px;"></div>
<div class="drag" style="left:180px;"></div>

<style type="text/css">
.drag {
	position: absolute;
	border: 1px solid #89B;
	background: #BCE;
	height: 58px;
	width: 58px;
	cursor: move;
	top: 100px;
	}
.drop {
	float: right;
	width: 299px;
	height: 299px;
	border: 1px dashed #888;
	background: #EEE;
	}		
.active {  
	background-color: #CEB;
	border-color: #9B8;
	}
</style>
<%
		Date fromDate = Calendar.getInstance().getTime();
	TimeZone tz = TimeZone.getDefault();
	           Date ret = new Date( fromDate.getTime() - tz.getRawOffset() );
System.out.println("tz -"+tz.getRawOffset()/3600000);
System.out.println("ret -"+ret);

	           // if we are now in DST, back off by the delta.  Note that we are checking the GMT date, this is the KEY.
	           if ( tz.inDaylightTime( ret ))
	           {
	              Date dstDate = new Date( ret.getTime() - tz.getDSTSavings() );
	              // check to make sure we have not crossed back into standard time
	              // this happens when we are on the cusp of DST (7pm the day before the change for PDT)
	              if ( tz.inDaylightTime( dstDate ))
	              {
	                 ret = dstDate;
	              
	              }
	           }
	        Date serDate = new Date(ret.getTime() +(int)(3600000*4.5));   //
	          System.out.println("---"+ (tz.getRawOffset()+(int)(3600000*4.5))/3600000);
	        System.out.println("Servertime -"+serDate);
	   
%>
<input type="text" value="<% out.println("GMT:00\t\t"+ret);%>">
<label><% out.println("GMT:4.5\t\t"+serDate);%></label>
</body></html>